Region::Region(SkinBitmap *bitmap, int xoffset, int yoffset, int _x, int _y, int _w, int _h, BOOL inverted, int dothreshold, char threshold, int thinverse) {
HRGN Region::alphaToRegionRect(SkinBitmap *bitmap, int xoffset, int yoffset, BOOL portion, int _x, int _y, int _w, int _h, BOOL inverted, int dothreshold, unsigned char threshold, int thinverse) {
HRGN hRgn = NULL;
int bmWidth=bitmap->getWidth();
int bmHeight=bitmap->getHeight();
int fullw=bitmap->getFullWidth();
void *pbits32=bitmap->getBits();
if (!pbits32) return NULL;
RGNDATA *pData;
int y, x;
// For better performances, we will use the ExtCreateRegion() function to create the
// region. This function take a RGNDATA structure on entry. We will add rectangles by
// amount of ALLOC_UNIT number in this structure.
// JF> rects are 8 bytes, so this allocates just under 16kb of memory, no need to REALLOC